/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cliente;

import sop_corba.CallbackPOA;

/**
 *
 * @author mauricio
 */
public class CallbackImpl extends CallbackPOA{
    
    private Tablero tablero;
    private String nick;
    private int id;

    public void setPrincipal(Tablero p){
        tablero=p;
    }
   
   @Override
    public String login() {
        return nick;
    }

    @Override
    public void recibirMsg(int n, int m, int id, String nom) {
       
        tablero.Actualizar_Tablero(n, m, id, nom);
    }
    
    @Override
    public int id() {
        return id;
    }
    
    @Override
    public void id(int newId) {
        id=newId;
    }

    @Override
    public void login(String newLogin) {
        nick=newLogin;
    }

    @Override
    public void bloquear() {
        tablero.Bloquear_Tablero();
    }
    
    @Override
    public void desbloquear() {
        tablero.Desbloquear_Tablero();
    }

    @Override
    public void reiniciar() {
        tablero.reiniciar();
    }
    
}